<template>
  <div>
    <div class="summary-row" v-if="tcmList.length">
      <div class="summary-item">
        <span class="label">最近辨识：</span>
        <span class="value">{{ tcmList[0].type || '-' }}</span>
      </div>
      <div class="summary-item">
        <span class="label">结果：</span>
        <span class="value">{{ tcmList[0].result || '-' }}</span>
      </div>
      <div class="summary-item">
        <span class="label">时间：</span>
        <span class="value">{{ tcmList[0].date || '-' }}</span>
      </div>
    </div>
    <el-table :data="tcmList.slice(0, 3)" style="width: 100%; margin-top: 10px;" v-if="tcmList.length">
      <el-table-column prop="date" label="辨识日期" />
      <el-table-column prop="type" label="体质类型" />
      <el-table-column prop="result" label="辨识结果" />
    </el-table>
    <el-empty v-else description="暂无体质辨识数据，快去首页添加吧！" />
  </div>
</template>
<script setup>
import { ref, onMounted } from 'vue'
// TODO: 替换为实际体质辨识API
const tcmList = ref([])
onMounted(async () => {
  // 示例数据，后续可对接后端API
  tcmList.value = []
})
</script>
<style scoped>
.summary-row {
  display: flex;
  gap: 24px;
  margin-bottom: 8px;
  font-size: 15px;
}
.summary-item .label {
  color: #888;
}
.summary-item .value {
  color: #67c23a;
  font-weight: bold;
}
</style> 